package com.java1412.service.service;

import com.java1412.dao.UserDao;
import com.java1412.entity.Users;
import com.java1412.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author java1412
 * @create 2021-05-20 10:35
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public int add(Users user) {
        return userDao.add(user);
    }

    @Override
    public int update(Users user) {
        return userDao.update(user);
    }

    @Override
    public int delete(int id) {
        return userDao.delete(id);
    }

    @Override
    public Users findUserById(int id) {
        return userDao.findUserById(id);
    }

    @Override
    public List<Users> findUserList() {
        return userDao.findUserList();
    }
}
